<?php

require_once 'conn.php';
header("content-type:text/html;charset=utf-8");


$username = $_POST['username'];
$password = md5($_POST['password']);
$logintime_at = time();
//print_r($_POST);
//echo"<pre>";
$sql = "INSERT INTO  `bbs`.`zc` (
`id` ,
`username` ,
`password` ,
`time_at`
)
VALUES (
NULL ,  '$username',  '$password',  '$logintime_at'
);";

//print_r($sql);
//echo"<pre>";

$result = $conn -> query($sql);
if($result===false){
    echo"数据库操作失败";
}else{
  header("location:register.html");  
}



